/*
 * Copyright (C) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the 'License');
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an 'AS IS' BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


#ifndef IMAGE_KNIFE_C_KEKE_IMAGEKNIFEC_TEST_H
#define IMAGE_KNIFE_C_KEKE_IMAGEKNIFEC_TEST_H

#include <stdbool.h>
#include <arkui/native_type.h>

#ifdef __cplusplus
extern "C" {
#endif

struct NativeImage {
    ArkUI_NodeHandle handle;
    bool isLoading;
    bool markDestroy;
    bool isAnimator;
};

typedef struct NativeImage NativeImage;

/**
 * @brief 创建系统Image，加载对应url图片并设置给创建的Image组件
 * 该函数仅用于测试验证，组件宽高为200*200
 * @param url 网络图片url
 * @return 返回组件handle wrapper，由调用者进行组件上下树
 */
NativeImage *CreateNativeImageWithUrl(const char *url);

/**
 * @brief 创建系统动图组件，加载对应url图片并设置给创建的Animator组件
 * 该函数仅用于测试验证，组件宽高为200*200
 * @param url 网络动图url
 * @return 返回组件handle wrapper，由调用者进行组件上下树
 */
NativeImage *CreateNativeAnimatorWithUrl(const char *url);

void ReleaseNativeImage(NativeImage *nativeImage);

#ifdef __cplusplus
}
#endif
#endif //IMAGE_KNIFE_C_KEKE_IMAGEKNIFEC_TEST_H
